package com.lyc.day1101.demo4;

/**
 * @author ：Xiaochen
 * @date ：Created in 2022/11/1 19:02
 * @description：
 * @modified By：
 * @version:
 */
public class TestJoin {
    public static void main(String[] args) throws InterruptedException {
        JoinDemo joinDemo = new JoinDemo();
        joinDemo.start();

        JoinDemo joinDemo2 = new JoinDemo();
        joinDemo2.start();


        joinDemo2.join();
        joinDemo.join();
        for (int i = 0; i < 20; i++) {
            System.out.println("main=============="+i);
        }

    }
}
class JoinDemo extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread().getName()+"**********"+i);
        }
    }
}